<template>
  <div>
    <dami-dialog @confirm="confirm" @cancel="cancel">
      <el-form :inline="true" class="demo-form-inline">
        <el-form-item label="名称">
          <el-input v-model="options.Name" placeholder="名称"></el-input>
        </el-form-item>
      </el-form>
    </dami-dialog>
  </div>
</template>

<script type="text/javascript">
import SYS_Category_add from  '../../../API/SYS_Category_add.js';

  export default {
    data() {
       return {
           options:{
             Name: '',
           }
       }
    },
    methods:{
      cancel(){
        this.$emit("cancel");
      },
      confirm(){
        SYS_Category_add(this.options).then(data => {
          this.$Message({
              message:"操作成功"
          });
          this.$emit("confirm");
        }).catch(message => {
          this.$Message({
              message
          });
        });
      }
    }
  }
</script>
